'
' *  Authors:  Benton Stark
' * 
' *  Copyright (c) 2007-2012 Starksoft, LLC (http://www.starksoft.com) 
' *
' * Permission is hereby granted, free of charge, to any person obtaining a copy
' * of this software and associated documentation files (the "Software"), to deal
' * in the Software without restriction, including without limitation the rights
' * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
' * copies of the Software, and to permit persons to whom the Software is
' * furnished to do so, subject to the following conditions:
' * 
' * The above copyright notice and this permission notice shall be included in
' * all copies or substantial portions of the Software.
' * 
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
' * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
' * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
' * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
' * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
' * THE SOFTWARE.
' * 
' 



Imports System.Collections.Generic
Imports System.Text

Namespace FTP
    ''' <summary>
    ''' Ftp feature item class.
    ''' </summary>
    Public Class FtpFeature
        Private _name As String
        Private _argList As FtpFeatureArgumentCollection


        ''' <summary>
        ''' Constructor to create a new ftp feature.
        ''' </summary>
        ''' <param name="name">Feature name (required).</param>
        ''' <param name="arguments">Argument list (can empty).</param>
        Public Sub New(name As String, arguments As String)
            If [String].IsNullOrEmpty(name) Then
                Throw New ArgumentNullException("name", "must have a value")
            End If
            If arguments Is Nothing Then
                Throw New ArgumentNullException("arguments", "cannot be null")
            End If
            _name = name
            If arguments.Length <> 0 Then
                _argList = New FtpFeatureArgumentCollection(arguments)
            Else
                _argList = New FtpFeatureArgumentCollection()
            End If
        End Sub

        ''' <summary>
        ''' Feature name.
        ''' </summary>
        Public ReadOnly Property Name() As String
            Get
                Return _name
            End Get
        End Property

        ''' <summary>
        ''' Get the FTP feature arguments collection.
        ''' </summary>
        Public ReadOnly Property Arguments() As FtpFeatureArgumentCollection
            Get
                Return _argList
            End Get
        End Property

    End Class
End Namespace
